package com.kang.service;

import com.kang.service.userService.DialogueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @program: photo_fawu
 * @description: webSocket实时聊天功能配置
 * @author: K.faWu
 * @create: 2021-11-23 10:41
 **/

@Configuration
public class webSocketConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
    @Autowired
    public void setUserService(UserService userService){
        WebSocketService.userService = userService;
    }
    @Autowired
    public void setDialogueMapper(DialogueService dialogueService){
        WebSocketService.dialogueService = dialogueService;
    }
}
